<link rel="stylesheet" type="text/css" href="__STATIC__mobile/css/goodsdetail.css" />
<link rel="stylesheet" type="text/css" href="__STATIC__mobile/css/carbuy.css" />
<div class="membersbox pad50">
    <style>
     <?php if($is_mobile) { ?>
.mdetail_bottom {
    width: 100%;
    position: fixed;
    z-index: 11;
    width:100%;
    bottom: 0;
    height: 50px;
    background: #fff;
    border-top: 1px solid #E9E9E9;
}
<?php }else{ ?>
             .mdetail_bottom {
    width: 100%;
    position: fixed;
    z-index: 11;
    width:25%;
    bottom: 0;
    height: 50px;
    background: #fff;
    border-top: 1px solid #E9E9E9;
}
             <?php  } ?>
    </style>
    
{:W('Slide/goods',array($goods))}

		<section class="mdetail_name">
			<div class="title"><?php echo $goods['goods_name'];?></div>
			<div class="price">
				<span class="symbol">¥</span>

				 <span class="number"> 
				 <?php echo $goods['shop_price'];?> 
				 </span> 

				 
				 <?php if($goods['is_hot']){?>
				 	<span class="status">热卖</span>
				 <?php } ?>
				 
				 <?php if($goods['is_new']){?>
				 	<span class="status">新品</span>
				 <?php } ?>
				 
				 <?php if($goods['is_tejia']){?>
				 	<span class="status">特价</span>
				 <?php }?>

			</div>
			<div class="otherinfo clearfix">
			
				<?php if($goods['market_price']){ ?>
				<span>原价：<s>¥<?php echo $goods['market_price'];?></s></span> 
				<?php } ?>
				
				<?php $full_baoyou = C("FULL_BAOYOU");?>
				
				<span>销量：<em><?php echo $goods['sale_basic']+$goods['sale_real'];?></em></span>
				
				<?php if($goods['is_shiwu']){ ?>
					 <?php if($jiage>=$full_baoyou || $goods['freight_payer'] == 1){?>
					 		<span>运费：<em>包邮</em></span>
					 <?php }else { ?>
						<span>运费：<em>满<?php echo $full_baoyou;?>元包邮</em></span>
					<?php } ?>
				<?php } ?>
				
			</div>

		</section>

		<!-- 点赞、分享 -->
		<!-- icon_praised表示已经赞过，若没赞则没有这个类 -->
<?php if(false){ ?>
<section class="sharedetail clearfix">
	<div class="detailPraise">
	<h4 class="clearfix" onclick="vote();">
		<p class="fl icon_common praise_class <?php echo $vtype?'icon_praise':'icon_praised';?>" id="vote"></p>
		<p class="shareinfo fl">点赞<br><span id="votenums"><?php echo $goods['vote_nums'];?></span></p>
	</h4>
	</div>
	<div class="detailshare">
		<h4 class="j-share clearfix" id="fxBtn">
			<p class="fl icon_common icon_share"></p>
			<p class="shareinfo nopraise fl share-link">分享</p>
		</h4>
	</div>     
</section>
<?php } ?>


		<section class="mdetail_goodsdet">
			<section class="mdetail_goodsdet_tit">
				<span class="cur" style="width:100%;">商品介绍<i></i></span> 
				<!-- TODO <span class="">评价（0）<i></i></span>-->
			</section>
			<section class="mdetail_goodsdet_con"> 
				<section class="detailConPanel" style="left: 0px;">

						<div class="fulltext">
							<?php echo htmlspecialchars_decode($goods['goods_desc']);?>
						</div>
						<!-- 商品详情二维码 -->
							<div class="detailCode" style="text-align:center">
							<!--  <img src="#<?php echo $goods['goods_id'];?>" width="60%" style="vertical-align: middle;" alt="">-->
							</div>

					<div class="detailCon" style="display: none;">
						<div class="j-detail-comment">
							<!-- 评论 -->
						</div>
					</div>
				</section>
			</section>
		</section>
		<section class="mdetail_bottom">

			<section class="cart bdbox" style="width:32%;">
				<a href="/mobile/cart/mycart"><img src="__STATIC__mobile/images/del5.png" width="50" height="50"></a> 
				<b id="J-addone-cartnum"><?php echo $cartNum;?></b> <em id="J-addone">+1</em>
			</section>
 
			<section class="actions bdbox clearfix">
			
							<!--   <?php if($memberinfo['grade_id'] <= 2){?>
				 	

				  <a href="javascript:void(0)" class="nobuy" >CEO会员请联系皇冠下单</a>
				


				 <?php }else{?>
			 <?php } ?>
			-->
			
			
				  <a href="javascript:;" need_guige="0" class="<?php echo empty($goods['guige'])&&!$guige_new ? 'btn-popupSKU-addcart' : 'j-openPopupSKU';?>" >加入购物车</a>
				
				 <?php if(!$nobuy){ ?>
				 <a  href="javascript:;" need_guige="0" class="<?php echo empty($goods['guige'])&&!$guige_new ? 'btn-popupSKU-buynow' : 'j-openPopupSKU buynow';?>">立即购买</a>
				 <?php }else{ ?>
				 <a  href="javascript:;" class="btn">商品未开售</a>
				 <?php } ?>
				 
				 
				 
			
			</section>
		</section>
		
<?php if(!empty($goods['guige']) OR !empty($guige_new)){ ?>		
<section class="popup-sku bdbox" id="j-popup-sku" style="display: none; transform: translate3d(0px, 0px, 0px);">
	<a href="javascript:;" class="btn-close j-close-popupSKU"></a>
	<section class="sku-top bdbox clearfix">
         <div class="photo" style="background-image:url(<?php echo C('UPYUN_DOMAIN').$goods['goods_pic'];?>!headimgurl)" id="j-popupSKU-img"></div>

         <div class="goods_info bdbox">
             <p class="price">
                 <span class="prefix"></span>
                 <span class="priceText">¥<i class="j-price"><?php echo $goods['shop_price'];?></i></span>
             </p>

             <p class="stock"><span class="j-stock">　</span></p>              
               <p class="selectedStatus j-selectedSKU" id="please_guige" style="display:none">请选择规格</p>

         </div>
	</section>

    <section class="mdetail_infor popup bdbox" style="margin-bottom:60px;">
        
        <!--  
        <dl class="number-control">
            <dd class="clearfix" >
                <div class="title fl" >购买数量</div>
                                    <div class="ctrl fr clearfix">
                    <a href="javascript:;" class="md_min">-</a>
                    <input type="tel" value="1" class="md_text appearance" id="j-stocknum-ipt" data-maxnum="9999">
                    <a href="javascript:;" class="md_add">+</a>
                </div>
            </dd>
        </dl>
        -->
        
        
        <?php foreach($goods['guige_name'] as $kk=>$vv){?>
        <dl class="number-control" >
            <dd class="clearfix" >
                <div class="title"><?php echo $kk;?></div>
                <div class="ctrl clearfix guige_em">
                <?php foreach($vv as $kkk=>$vvv){ ?>
                    <em class="guige" kid="<?php echo $kkk;?>" guige_id="<?php echo $vvv['guige_id'];?>" child=""><?php echo $vvv['name'];?></em>
				<?php } ?>
                </div>
            </dd>
        </dl>
        <?php } ?>
		<div id="guige-group">
		<?php foreach($guige_new as $kk=>$vv){?>
        <dl class="number-control" >
            <dd class="clearfix" >
                <div class="title"><?php echo $guige_names[$kk];?></div>
                <div class="ctrl clearfix guige_em guige_new">
                <?php foreach($vv as $kkk=>$vvv){ ?>
                    <em class="guige" guige-x="<?=$kk?>" guige-y="<?=$kkk?>" child=""><?php echo $vvv;?></em>
				<?php } ?>
                </div>
            </dd>
        </dl>
        <?php } ?>
        </div>
    </section>

    <section class="actions bdbox clearfix">
    

				 
        <a href="javascript:;" class="fl btn-next bdbox j-addCart addCart btn-popupSKU-addcart" need_guige="1" style="display: block;">加入购物车</a>
        <!--end 加入购物车 -->

        <a href="javascript:;" class="fl btn-next bdbox j-buyNow buyNow btn-popupSKU-buynow" need_guige="1" style="display: none;">立即购买</a>
        <!--end 立即购买 -->
        
				
    
    
    
    


    </section> 
</section>
			
<section class="j-close-popupSKU" id="overlay" style="display: none;"></section>		
<?php } ?>		
					

		<!-- 底部按钮 -->
	<include file="Common:bottom" />
</div>

<input type="text" value="" style="display:none" id="chose_kid">
<script>
var goods_guige = '<?php echo json_encode($goods['guige']);?>';
guige_obj = eval("("+goods_guige+")");
goods_id = "<?php echo $goods['goods_id'];?>";
</script>
<script src="__STATIC__mobile/js/carbuy.js"></script>



<include file="Common:xuanfubtn" />


<include file="Common:collectbtn" />
<include file="Common:js" />